}
_updateButtons() {
- let dialogContent = DialogContent[this._type];
- let buttons = [{ action: this.cancel.bind(this),
+ this.clearButtons();
+
+ this.addButton({ action: this.cancel.bind(this),
label: _("Cancel"),
- key: Clutter.KEY_Escape }];
+ key: Clutter.KEY_Escape });
+ let dialogContent = DialogContent[this._type];
for (let i = 0; i < dialogContent.confirmButtons.length; i++) {
let signal = dialogContent.confirmButtons[i].signal;
let label = dialogContent.confirmButtons[i].label;
- buttons.push({
+ let button = this.addButton({
action: () => {
this.close(true);
let signalId = this.connect('closed', () => {
label,
});
}
-
- this.setButtons(buttons);
}
close(skipSignal) {